package com.fary.security.authentication;

import com.fary.security.core.Authentication;
import com.fary.security.core.AuthenticationException;

public interface AuthenticationProvider {
	// ~ Methods
	// ========================================================================================================

	/**
	 * 通过参数Authentication对象，进行认证
	 */
	Authentication authenticate(Authentication authentication) throws AuthenticationException;

	/**
	 * 是否支持该认证类型
	 */
	boolean supports(Class<?> authentication);
}